using MicroMsg.Resource.@string;
using MicroMsg.Storage;
using MicroMsg.UI.Page;
using MicroMsg.UI.Util;
using System;
using System.Windows.Media;
namespace MicroMsg.Manager
{
	public class GuideHeadSetMgr
	{
		public const string HintConversationType = "SetHeadHint";
		public const string cStrKeyIsGuideHeadShown = "cStrKeyIsGuideHeadShown";
		public const string cStrKeyIsGuideHeadHasShown = "cStrKeyIsGuideHeadHasShown";
		public static void CreateNewHintConv()
		{
			ConfigMgr.setBool("cStrKeyIsGuideHeadHasShown", true);
			if (!GuideHeadSetMgr.isNeedCreate())
			{
				return;
			}
			Conversation conversation = new Conversation();
			conversation.nTime = 94608000000L;
			conversation.strMsgType = "SetHeadHint";
			conversation.strUsrName = "SetHeadHint@SetHeadHint";
			StorageMgr.converation.vmethod_0(conversation);
			ConfigMgr.setBool("cStrKeyIsGuideHeadShown", true);
		}
		public static bool isNeedCreate()
		{
			return true;
		}
		public static bool isShown()
		{
			return ConfigMgr.getBool("cStrKeyIsGuideHeadShown", false);
		}
		public static void deleteGuideHeadItem()
		{
			if (MainPage.mainPageInstance != null)
			{
				MainPage.mainPageInstance.mSessionView.RemoveGuideHeadSetItem();
				ConfigMgr.setBool("cStrKeyIsGuideHeadShown", false);
			}
		}
		public static bool IsSetHeadHintConv(Conversation conv)
		{
			return conv != null && conv.strMsgType == "SetHeadHint";
		}
		public static string GetHintTitle(Conversation conv)
		{
			return strings.GuideHead_Title;
		}
		public static string GetHintInfo(Conversation conv)
		{
			return strings.GuideHead_Con;
		}
		public static ImageSource GetBindHead(Conversation conv)
		{
			return R.theme.GuideHeadSet;
		}
		public static void GotoSetHeadImg()
		{
			ToolFunction.GotoPageForUserControl("/Source/UI/Setting/PersonalInfoView.xaml", new object[]
			{
				"SetHeadHint"
			}, false);
		}
	}
}
